package com.heima.listener;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class testlistener {

    @KafkaListener(topics = "test-Topic",groupId ="1001")
    public void getmessage(String message){
        System.out.println("接受到了消息"+message);
        System.out.println("1");
    }

    @KafkaListener(topics = "test-Topic",groupId = "1002")
    public void getmessage2(String message){
        System.out.println("接受到了消息"+message);
        System.out.println("2");
    }

}
